<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>自定义组件</title>
    <script src="../vue3.js"></script>
</head>
<body>
<div id="application">
    <my-input>
        <template v-slot:header>
            <p>这是头部内容</p>
            <p>hello world</p>
        </template>
        <template #main>
            <ol>
                <li>1</li>
                <li>2</li>
            </ol>
        </template>
        <template #footer>
            底部内容
        </template>
    </my-input>
</div>
<script>
    const app = Vue.createApp({})
    const inputComponent = {
        template: `<div>
<slot name="header"></slot>
<hr>
<slot name="main"></slot>
<hr>
<slot name="footer"></slot>
</div>`
    }
    app.component("my-input", inputComponent);
    app.mount("#application")
</script>
</body>
</html>